/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.File;
import java.io.FileFilter;

/**
 *
 * @author LZH
 */

public class myFileFilter implements FileFilter{

    @Override
    public boolean accept(File file) {
                //if the file extension is picture return true, else false
                if (file.getName().endsWith(".jpg")||
                        file.getName().endsWith(".jpeg") ||
                        file.getName().endsWith(".png") ||
                        file.getName().endsWith(".gif") ||
                        file.getName().endsWith(".bmp")) {
                    return true;
                }
                return false;
    }
    
}